<div>
    <div class="row" style="padding: 0 20px 0;">
        <nodestr></nodestr>
    </div>

    <hr class="mv10 clear">

    <div class="panel panel-primary">

        <div class="panel-heading">
            <h5>查询条件</h5>
        </div>

        <div class="panel-body">

            <div class="form-horizontal">

                <form class="form-inline" name="searchForm" novalidate>
                    <div class="container-fluid">
                        <div class="row">
                            <div class="form-group col-sm-4" style="padding: 0">
                                <label style="float: left;line-height: 34px;min-width: 90px;text-align: right;">作业名称:</label>
                                <input type="text" class="form-control"  ng-model="businesscrontab.cronname" placeholder="定时任务名称">
                            </div>
                            <div class="form-group col-sm-4" style="padding: 0">
                                <label style="float: left;line-height: 34px;min-width: 90px;text-align: right;">创建人:</label>
                                <input type="text" class="form-control" ng-model="businesscrontab.createuser" placeholder="创建人全称">
                                <button type="submit" class="btn btn-default" ng-click="businesscrontab.getMe()">我</button>
                            </div>
                            <div class="form-group col-sm-4" style="padding: 0">
                                <label style="float: left;line-height: 34px;min-width: 90px;text-align: right;">最后修改人:</label>
                                <input type="text" class="form-control" ng-model="businesscrontab.edituser" placeholder="创建人全称">
                                <button type="submit" class="btn btn-default" ng-click="businesscrontab.getMe()">我</button>
                            </div>
                        </div>

                        <div class="row" style="margin-top: 23px">

                            <div class="form-group col-sm-6" style="padding: 0">
                                <label style="float: left;line-height: 34px;min-width: 90px;text-align: right;">创建时间：</label>
                                <div style="width: 30%" class='input-group date' id='createstart'>
                                    <input type='text' class="form-control"  ng-model="businesscrontab.createStart" placeholder="开始时间"/>
                                    <span class="input-group-addon">
                                        <span class="glyphicon glyphicon-calendar"></span>
                                    </span>
                                </div>
                                <span style="margin: 0 5px;">-</span>
                                <div style="width: 30%" class='input-group date' id='createend'>
                                    <input type='text' class="form-control" ng-model="businesscrontab.createEnd" placeholder="结束时间"/>
                                    <span class="input-group-addon">
                                        <span class="glyphicon glyphicon-calendar"></span>
                                    </span>
                                </div>

                            </div>

                            <div class="form-group col-sm-6" style="padding: 0">
                                <label style="float: left;line-height: 34px;min-width: 90px;text-align: right;">修改时间：</label>
                                <div style="width: 30%" class='input-group date' id='editstart'>
                                    <input type='text' class="form-control"  ng-model="businesscrontab.editStart" placeholder="开始时间"/>
                                    <span class="input-group-addon">
                                        <span class="glyphicon glyphicon-calendar"></span>
                                    </span>
                                </div>
                                <span style="margin: 0 5px;">-</span>
                                <div style="width: 30%" class='input-group date' id='editend'>
                                    <input type='text' class="form-control" ng-model="businesscrontab.editEnd" placeholder="结束时间"/>
                                    <span class="input-group-addon">
                                        <span class="glyphicon glyphicon-calendar"></span>
                                    </span>
                                </div>

                            </div>
                        </div>


                    </div>

                </form>

                <hr class="mv20 clear" style="margin-top: 30px!important;">
                <div class="col-md-10">
                    <button class="btn btn-primary" ng-click="businesscrontab.reload()">
                        <i class="fa fa-search fa-fw"></i>查询
                    </button>
                    <button class="btn btn-success" ng-click="businesscrontab.Reset()">
                        <i class="fa fa-refresh fa-fw"></i>重置
                    </button>
                </div>

            </div>

        </div>
    </div>

    <div>
        <div style="float: right;">
            <form class="form-inline" name="myForm" novalidate>
                <button type="submit" ng-disabled="myForm.$invalid" class="btn btn-primary" ng-click="businesscrontab.createCron()"><i class="glyphicon glyphicon-plus" aria-hidden="true"></i>创建定时任务</button>
            </form>
        </div>
        <div style="clear: both;">&nbsp;</div>
    </div>

    <div class="panel panel-dark">

        <div class="panel-heading">
            <span class="panel-controls">
                <button class="btn btn-dark" uib-tooltip="刷新" ng-click="businesscrontab.reload()" ><i class="fa fa-refresh fa-fw" ng-class="{'fa-spin':!businesscrontab.loadover}" ></i></button>
            </span>
            <h5>定时任务</h5>
        </div>

        <div class="panel-body">
            <div class="panel-tabs">
                <table ng-table="businesscrontab.data_Table" class="table table-hover text-center table-condensed">
                <tr ng-repeat="ss in $data">
                    <td data-title="'定时任务'">{{ss.name}}</td>
                    <td data-title="'规则'">{{ss.cron}}</td>
                    <td data-title="'创建用户'">{{ss.create_user}}</td>
                    <td data-title="'创建时间'">{{ss.create_time}}</td>
                    <td data-title="'修改用户'">{{ss.edit_user}}</td>
                    <td data-title="'最后修改时间'">{{ss.edit_time}}</td>
                    <td data-title="'操作'">
                        <button ng-if="ss.status == 'unavailable'" class="btn btn-primary btn-sm" ng-click="businesscrontab.runCronJob(ss.id)">开始</button>
                        <button ng-if="ss.status == 'available'" class="btn btn-primary btn-sm" ng-click="businesscrontab.stopCronJob(ss.id)">暂停</button>
                        <span class="mr5" style="border-left:2px solid #ddd;padding:0px 0 0px 0;"></span>
                        <button class="btn btn-warning btn-sm" ng-click="businesscrontab.editCronJob(ss.id)">修改</button>
                        <button class="btn btn-danger btn-sm" ng-click="businesscrontab.deleteCronJob(ss.id)">删除</button>
                    </td>
                </tr>
            </table>
            </div>
        </div>
    </div>

</div>
